﻿//www.codeOften.com
//Senthil Maruthaiappan - senips (at) gmail.com
//see license on http://www.codeplex.com/Jinglebell


using System.Collections.Generic;
using CodeOften.Container;
using JingleBell.Interface;

namespace JingleBell.Library
{
    public class ProcessQueue : IProcessQueue
    {
        private readonly Queue<CommandItem> _queue = new Queue<CommandItem>();
        public IServices Services { get; set; }

        #region IProcessQueue Members

        public void Enqueue(CommandItem item)
        {
            _queue.Enqueue(item);
        }

        public void Clear()
        {
            _queue.Clear();
        }

        public CommandItem Dequeue
        {
            get { return _queue.Dequeue(); }
        }

        public int Count
        {
            get { return _queue.Count; }
        }

        #endregion
    }
}